#ifndef USERITEM_H
#define USERITEM_H

#include <QWidget>

namespace Ui {
class UserItem;
}

class UserItem : public QWidget
{
    Q_OBJECT

public:
    explicit UserItem(QWidget *parent = nullptr);
    ~UserItem();
    //设置用户信息
    void slot_setInfo(int id , QString name,int status,int icon ,QString feeling);
    //设置用户下线
    void slot_setUserOffline();
    int m_status;
    QString m_name;
    int m_type;//0是用户的item，1是群聊的item
private slots:
    void on_pb_icon_clicked();

private:
    Ui::UserItem *ui;
    int m_id ;
    int m_icon ;
    QString m_feeling;

signals:
    //点击头像发送信号
    void SIG_userItemClicked(int id);
    //点击群聊头像发送信号
    void SIG_groupItemClicked(int fd);
};

#endif // USERITEM_H
